package com.findfuture.demo.controller;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 11-11-3
 * Time: 下午12:31
 * To change this template use File | Settings | File Templates.
 */
@Controller
@RequestMapping("/test")
public class DemoController {
 	private static Log logger = LogFactory.getLog(DemoController.class);

    @RequestMapping("/hello")
    public void Hello() {
        logger.info("The hello() method is use");
    }

    @RequestMapping("/welcome")
    public String welcome() {
        logger.info("The welcome() method is use ");
//        return "/welcome";
        return "/WEB-INF/jsp/welcome";
    }

    @RequestMapping("/helloWorld")
    public ModelAndView helloWorld() {
        logger.info("The helloWorld() method is use");
        ModelAndView view = new ModelAndView();
        // view.setViewName("/helloworld");
        // view.setViewName("/WEB-INF/JSP/helloworld");
        view.setViewName("/hello");
        return view;
    }
}
